/* 全局样式 - Element UI风格 */
:root {
    /* Element UI颜色系统 */
    --el-color-primary: #409EFF;
    --el-color-primary-light-1: #53a8ff;
    --el-color-primary-light-3: #79bbff;
    --el-color-primary-light-5: #a0cfff;
    --el-color-primary-light-7: #c6e2ff;
    --el-color-primary-light-8: #d9ecff;
    --el-color-primary-light-9: #ecf5ff;
    --el-color-primary-dark-2: #337ecc;
    --el-color-success: #67C23A;
    --el-color-success-light: #e1f3d8;
    --el-color-warning: #E6A23C;
    --el-color-warning-light: #faecd8;
    --el-color-danger: #F56C6C;
    --el-color-danger-light: #fde2e2;
    --el-color-info: #909399;
    --el-color-info-light: #e9e9eb;
    --el-text-color-primary: #303133;
    --el-text-color-regular: #606266;
    --el-text-color-secondary: #909399;
    --el-text-color-placeholder: #C0C4CC;
    --el-border-color-base: #DCDFE6;
    --el-border-color-light: #E4E7ED;
    --el-border-color-lighter: #EBEEF5;
    --el-border-color-extra-light: #F2F6FC;
    --el-bg-color: #FFFFFF;
    --el-bg-color-page: #F2F3F5;
    --el-shadow-base: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
    --el-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    --el-shadow-dark: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.12);
}

body {
    background-color: var(--el-bg-color-page);
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    color: var(--el-text-color-primary);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 修复模态框遮罩层问题 */
body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

/* 导航栏样式优化 */
.navbar-dark.bg-primary {
    background-color: var(--el-color-primary) !important;
    box-shadow: var(--el-shadow-light);
}

.navbar-brand {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link {
    font-weight: 400;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: all 0.3s;
    color: white !important;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* 卡片样式 - Element UI风格 */
.card {
    border: 1px solid var(--el-border-color-lighter);
    border-radius: 4px;
    box-shadow: var(--el-shadow-light);
    overflow: hidden;
    transition: all 0.3s;
    background-color: var(--el-bg-color);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--el-shadow-dark);
}

.card-header {
    background-color: var(--el-bg-color);
    color: var(--el-text-color-primary);
    font-weight: 500;
    border-bottom: 1px solid var(--el-border-color-light);
    padding: 15px 20px;
    font-size: 16px;
}

/* Element UI风格按钮 */
.btn {
    border-radius: 4px;
    font-weight: 400;
    transition: all 0.3s;
    /* padding: 8px 15px; */
    font-size: 14px;
    line-height: 1;
    border: 1px solid transparent;
    outline: none;
}

.btn-primary {
    background-color: var(--el-color-primary);
    border-color: var(--el-color-primary);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--el-color-primary-light-1);
    border-color: var(--el-color-primary-light-1);
    box-shadow: none;
}

.btn-success {
    background-color: var(--el-color-success);
    border-color: var(--el-color-success);
}

.btn-success:hover {
    background-color: #85ce61;
    border-color: #85ce61;
}

.btn-danger {
    background-color: var(--el-color-danger);
    border-color: var(--el-color-danger);
}

.btn-danger:hover {
    background-color: #f78989;
    border-color: #f78989;
}

.btn-outline-primary {
    color: var(--el-color-primary);
    border-color: var(--el-color-primary);
    background-color: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary.active {
    background-color: var(--el-color-primary);
    border-color: var(--el-color-primary);
    color: white;
}

.btn-light {
    background-color: var(--el-bg-color);
    border-color: var(--el-border-color-base);
    color: var(--el-text-color-regular);
}

.btn-light:hover {
    background-color: var(--el-bg-color);
    border-color: var(--el-color-primary);
    color: var(--el-color-primary);
}

/* 表单控件 - Element UI风格 */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid var(--el-border-color-base);
    padding: 0 15px;
    height: 40px;
    transition: all 0.3s;
    color: var(--el-text-color-regular);
    font-size: 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--el-color-primary);
    box-shadow: none;
}

textarea.form-control {
    padding: 10px 15px;
}

.form-label {
    font-size: 14px;
    color: var(--el-text-color-regular);
    margin-bottom: 8px;
}

.form-text {
    font-size: 12px;
    color: var(--el-text-color-secondary);
}

/* 密码字段样式 */
.password-field {
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--el-text-color-primary);
    font-weight: 500;
}

/* 密码隐藏显示为点 */
.password-dots {
    display: inline-block;
    letter-spacing: 2px;
    color: var(--el-text-color-secondary);
}

/* 表格 - Element UI风格 */
.table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
    color: var(--el-text-color-regular);
    margin-bottom: 20px;
    border: 1px solid var(--el-border-color-lighter);
    border-radius: 4px;
    box-shadow: none;
    overflow: hidden;
}

.table th {
    padding: 12px 0;
    background-color: var(--el-bg-color-page);
    font-weight: 500;
    color: var(--el-text-color-primary);
    text-align: left;
    padding-left: 10px;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.table td {
    padding: 12px 0;
    padding-left: 10px;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.table-hover tbody tr:hover {
    background-color: var(--el-color-primary-light-9);
}

.table-light {
    background-color: var(--el-bg-color-page);
}

.table-danger {
    background-color: var(--el-color-danger-light) !important;
}

.table-warning {
    background-color: var(--el-color-warning-light) !important;
}

/* 表格操作按钮样式 */
.action-buttons .btn {
    padding: 7px 12px;
    font-size: 12px;
    margin-right: 8px;
    border-radius: 4px;
}

/* 密码强度指示器样式 */
.password-strength {
    position: relative;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.strength-bar.weak {
    background-color: #dc3545;
}

.strength-bar.medium {
    background-color: #ffc107;
}

.strength-bar.strong {
    background-color: #28a745;
}

.strength-bar.very-strong {
    background-color: #17a2b8;
}

.strength-text {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 12px;
    color: #6c757d;
}

/* 密码强度容器样式 */
.password-strength-container {
    min-height: 24px;
    margin-bottom: 8px;
}

/* 类别标签样式 - Element UI风格的Tag */
.category-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 400;
    line-height: 1.4;
}

.category-website {
    background-color: var(--el-color-primary-light-9);
    color: var(--el-color-primary);
    border: 1px solid var(--el-color-primary-light-5);
}

.category-app {
    background-color: #f0f9eb;
    color: var(--el-color-success);
    border: 1px solid #e1f3d8;
}

.category-other {
    background-color: var(--el-color-info-light);
    color: var(--el-color-info);
    border: 1px solid #e9e9eb;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 13px;
    }
    
    .action-buttons .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 登录页面样式 - Element UI风格 */
#login-container .card {
    border: 1px solid var(--el-border-color-lighter);
    border-radius: 4px;
    box-shadow: var(--el-shadow-light);
    transition: all 0.3s;
    max-width: 400px;
    margin: 0 auto;
}

#login-container .card-header {
    padding: 20px;
    background-color: var(--el-bg-color);
    color: var(--el-text-color-primary);
    border-bottom: 1px solid var(--el-border-color-light);
    text-align: center;
    font-size: 20px;
    font-weight: 500;
}

#login-container .card-body {
    padding: 30px 25px;
}

/* 提醒和警告框 - Element UI风格 */
.alert {
    padding: 8px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    line-height: 1.4;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: var(--el-color-success-light);
    color: var(--el-color-success);
}

.alert-info {
    background-color: var(--el-color-primary-light-9);
    color: var(--el-color-primary);
}

.alert-warning {
    background-color: var(--el-color-warning-light);
    color: var(--el-color-warning);
}

.alert-danger {
    background-color: var(--el-color-danger-light);
    color: var(--el-color-danger);
}

/* 模态框样式 - Element UI风格 */
.modal-content {
    border: none;
    border-radius: 4px;
    box-shadow: var(--el-shadow-light);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background-color: var(--el-bg-color);
    color: var(--el-text-color-primary);
    border-bottom: 1px solid var(--el-border-color-light);
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--el-text-color-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--el-border-color-light);
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
}

.btn-close {
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* 复制成功提示 - Element UI风格 */
.copy-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    animation: fadeOut 1.5s forwards;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* 美化滚动条 - Element UI风格 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 